package org.msb.accentis.data.pojo;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;

/**
 * 
 * @author Marc Boudreau
 * 
 * @since 1.0
 */
@Entity
@NamedQueries( { @NamedQuery(name = "Institution.getAllInstitutions", query = "SELECT i FROM Institution i ORDER BY i.name") })
public class Institution extends NamedObject {

	@Lob
	private String institutionAddress;

	@Basic
	private String contactName;

	@Basic
	private String phoneNumber;

	@Basic
	private String email;

	@Basic
	private String website;

	/**
	 * Returns the address set for this {@code Institution} object.
	 * 
	 * @return A {@link String} object representing the address set for this object, or {@code null} if no address has been set.
	 */
	public String getAddress() {
		return institutionAddress;
	}

	/**
	 * Sets the address for this {@code Institution} object to the provided {@link String} object.
	 * 
	 * @param address
	 *            A {@link String} object representing the address to set.
	 */
	public void setAddress(String address) {
		institutionAddress = address;
	}

	/**
	 * Returns the contact information set for this {@code Institution} object. The contact information can consist of any text that assists the user in
	 * remembering who or how to contact a particular institution.
	 * 
	 * @return The {@link String} object representing the contact information set for this object, or {@code null} if none has been set.
	 */
	public String getContact() {
		return contactName;
	}

	/**
	 * Sets the contact information for this {@code Institution} object to the provided {@link String} object.
	 * 
	 * @param name
	 *            A {@link String} object representing the contact information.
	 */
	public void setContact(String name) {
		contactName = name;
	}

	/**
	 * Returns the phone number set for this {@code Institution} object. The phone number is represented by a {@link String} object in order to be able to
	 * accommodate non-numerical characters like dashes, parenthesis, and plus characters.
	 * 
	 * @return The {@link String} object representing the phone number set for this object, or {@code null} if none has been set.
	 */
	public String getPhoneNumber() {
		return phoneNumber;
	}

	/**
	 * Sets the phone number for this {@code Institution} object to the provided {@link String} object.
	 * 
	 * @param value
	 *            A {@link String} object representing the phone number.
	 */
	public void setPhoneNumber(String value) {
		phoneNumber = value;
	}

	/**
	 * Returns the email address set for this {@code Institution} object.
	 * 
	 * @return The {@link String} object representing the email address set for this object, or {@code null} if none has been set.
	 */
	public String getEmail() {
		return email;
	}

	/**
	 * Sets the email address for this {@code Institution} object to the provided {@link String} object.
	 * 
	 * @param value
	 *            A {@link String} object representing the email address.
	 */
	public void setEmail(String value) {
		email = value;
	}

	/**
	 * Returns the web site address set for this {@code Institution} object.
	 * 
	 * @return The {@link String} object representing the web site address set for this object, or {@code null} if none has been set.
	 */
	public String getWebsite() {
		return website;
	}

	/**
	 * Sets the web site address for this {@code Institution} object to the provided {@link String} object.
	 * 
	 * @param value
	 *            A {@link String} object representing the web site address.
	 */
	public void setWebsite(String value) {
		website = value;
	}
}
